package edu.scu.declaresys.web.action;

import com.opensymphony.xwork2.Action;

import edu.scu.declaresys.config.IAttrName;
import edu.scu.declaresys.service.ServiceFactory;
import edu.scu.declaresys.service.intr.INewsService;
import edu.scu.declaresys.vo.NewsClass;
import edu.scu.declaresys.web.ABaseAction;

/**
 * 
 * @author: zt
 * @since : 2013-7-8
 */
public class IndexAction extends ABaseAction
{
	private static final long	serialVersionUID	= -5082481273534291665L;
	
	private INewsService newsService = ServiceFactory.createNewsService();
	
	public String indexNews() throws Exception
	{
		request.setAttribute(NewsClass.BULLETIN_BOARD, newsService.findLatestBulletinNews());
		request.setAttribute(NewsClass.FUND_NEWS, newsService.findLatestFundNews());
		request.setAttribute(NewsClass.DECLARE_PROCESS, newsService.findLatestDeclareProcessNews());
		request.setAttribute(NewsClass.PROJECT_NEWS, newsService.findLatestProjectNews());
		request.setAttribute(IAttrName.LOAD_NEWS_FLAG, IAttrName.LOAD_NEWS_CONTENT);
		return Action.SUCCESS;
	}
	
}
